#ifndef POINTDIALOG_H
#define POINTDIALOG_H

#include <QtGui>
#include "ui_pointdialog.h"

#include <QGLViewer/qglviewer.h>
using namespace qglviewer;

#include "doublespinboxdelegate.h"
#include "directionvectorwidget.h"

class PointDialog : public QDialog
{
 Q_OBJECT

 public :
  PointDialog(QWidget *parent=NULL);
  ~PointDialog();

  void clear();
  void setPoints(QList<Vec>);
  void setHideRawValues(bool);

 signals :
  void pointNumber(int);
  void pointChanged(int, Vec);
  void pointsChanged(QList<Vec>);
  void showPoints(bool);
  void showRawValues(bool);
  void directionChanged(int, Vec);

 private slots :
  void doubleClicked(QModelIndex);
  void valueChanged(double);
  void on_showpoints_clicked(bool);
  void on_showvalues_clicked(bool);
  void on_pointlist_itemClicked(QListWidgetItem*);
  void directionChanged(float, Vec);
  void on_apply_pressed();
  void on_tabWidget_currentChanged(int);

 private :
  Ui::PointDialog ui;

  DirectionVectorWidget *m_directionVector;

  DoubleSpinBoxDelegate m_delegate;
  QStandardItemModel m_model;

  QList<Vec> m_points;
  int m_row, m_column;

  int m_currPoint;

  void changePoints();
};


#endif
